import { createRouter, createWebHistory ,createWebHashHistory} from 'vue-router'
import HomeView from '../views/home.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      meta: {
        showMenu: true
      }
    },
    {
      path: '/note',
      name: 'note',
      component: () => import('../views/note.vue'),
      meta: {
        showMenu: true
      }
    },
    {
      path: "/memo",
      name: "memo",
      component: () => import('../views/memo.vue'),
      meta: {
        showMenu: true
      }
    },
    {
      path: "/code",
      name: "code",
      component: () => import('../views/code.vue'),
      meta: {
        showMenu: true
      }
    },
    {
      path: "/setting",
      name: "setting",
      component: () => import('../views/setting.vue'),
      meta: {
        showMenu: true
      }
    }, {
      path: "/ememo/:id",
      name: "ememo-id",
      component: () => import('../views/ememo.vue'),
      meta: {
        showMenu: false
      }
    }, {
      path: "/ememo",
      name: "ememo",
      component: () => import('../views/ememo.vue'),
      meta: {
        showMenu: false
      }
    }
  ]
})

export default router
